package com.eduhzy.ttw.commonsdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xubo
 * @date 2018/8/30 10:34
 */
public class RightOrderInfo implements Parcelable {

    /**
     * createDate : 1535596407935
     * id : 881
     * itemCount : 1
     * itemList : [{"description":"堂堂网 | 视频 | 448.0&nbsp;MB","doublePrice":2,"id":885,"isComment":false,"logo":"http://res.tangt.cn//res/common/img/ico/video_b.png","name":"2.一元二次方程根的判别式的应用","orderId":1535596407935850,"price":200,"productId":998,"productType":"虚拟商品","type":3}]
     * mobile : 18975875500
     * orderNoId : 1535596407935850
     * orderStatus : 0
     * orderStatusStr : 待付款
     * payPrice : 200
     * payPriceStr : 2.00
     * payTypeStr : --
     * platId : 3
     * productType : 3
     * realName : 张三
     * schoolName :
     * shopId : 0
     * shopName : 堂堂网自营
     * title : 2.一元二次方程根的判别式的应用
     * userId : 382984
     * userName : 18975875500
     */

    private long createDate;
    private int id;
    private int itemCount;
    private String mobile;
    private long orderNoId;
    private int orderStatus;
    private String orderStatusStr;
    private int payPrice;
    private String payPriceStr;
    private String payTypeStr;
    private int platId;
    private int productType;
    private String realName;
    private String schoolName;
    private int shopId;
    private String shopName;
    private String title;
    private int userId;
    private String userName;
    private List<ItemListBean> itemList;

    public long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(long createDate) {
        this.createDate = createDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getItemCount() {
        return itemCount;
    }

    public void setItemCount(int itemCount) {
        this.itemCount = itemCount;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public long getOrderNoId() {
        return orderNoId;
    }

    public void setOrderNoId(long orderNoId) {
        this.orderNoId = orderNoId;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatusStr() {
        return orderStatusStr;
    }

    public void setOrderStatusStr(String orderStatusStr) {
        this.orderStatusStr = orderStatusStr;
    }

    public int getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(int payPrice) {
        this.payPrice = payPrice;
    }

    public String getPayPriceStr() {
        return payPriceStr;
    }

    public void setPayPriceStr(String payPriceStr) {
        this.payPriceStr = payPriceStr;
    }

    public String getPayTypeStr() {
        return payTypeStr;
    }

    public void setPayTypeStr(String payTypeStr) {
        this.payTypeStr = payTypeStr;
    }

    public int getPlatId() {
        return platId;
    }

    public void setPlatId(int platId) {
        this.platId = platId;
    }

    public int getProductType() {
        return productType;
    }

    public void setProductType(int productType) {
        this.productType = productType;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public List<ItemListBean> getItemList() {
        return itemList;
    }

    public void setItemList(List<ItemListBean> itemList) {
        this.itemList = itemList;
    }

    public static class ItemListBean implements Parcelable {

        /**
         * description : 堂堂网 | 视频 | 448.0&nbsp;MB
         * doublePrice : 2
         * id : 885
         * isComment : false
         * logo : http://res.tangt.cn//res/common/img/ico/video_b.png
         * name : 2.一元二次方程根的判别式的应用
         * orderId : 1535596407935850
         * price : 200
         * productId : 998
         * productType : 虚拟商品
         * type : 3
         */

        private String description;
        private double doublePrice;
        private int id;
        private boolean isComment;
        private String logo;
        private String name;
        private long orderId;
        private int price;
        private int productId;
        private String productType;
        private int type;

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public double getDoublePrice() {
            return doublePrice;
        }

        public void setDoublePrice(double doublePrice) {
            this.doublePrice = doublePrice;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public boolean isIsComment() {
            return isComment;
        }

        public void setIsComment(boolean isComment) {
            this.isComment = isComment;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public long getOrderId() {
            return orderId;
        }

        public void setOrderId(long orderId) {
            this.orderId = orderId;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public String getProductType() {
            return productType;
        }

        public void setProductType(String productType) {
            this.productType = productType;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public ItemListBean() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.description);
            dest.writeDouble(this.doublePrice);
            dest.writeInt(this.id);
            dest.writeByte(this.isComment ? (byte) 1 : (byte) 0);
            dest.writeString(this.logo);
            dest.writeString(this.name);
            dest.writeLong(this.orderId);
            dest.writeInt(this.price);
            dest.writeInt(this.productId);
            dest.writeString(this.productType);
            dest.writeInt(this.type);
        }

        protected ItemListBean(Parcel in) {
            this.description = in.readString();
            this.doublePrice = in.readDouble();
            this.id = in.readInt();
            this.isComment = in.readByte() != 0;
            this.logo = in.readString();
            this.name = in.readString();
            this.orderId = in.readLong();
            this.price = in.readInt();
            this.productId = in.readInt();
            this.productType = in.readString();
            this.type = in.readInt();
        }

        public static final Creator<ItemListBean> CREATOR = new Creator<ItemListBean>() {
            @Override
            public ItemListBean createFromParcel(Parcel source) {
                return new ItemListBean(source);
            }

            @Override
            public ItemListBean[] newArray(int size) {
                return new ItemListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.createDate);
        dest.writeInt(this.id);
        dest.writeInt(this.itemCount);
        dest.writeString(this.mobile);
        dest.writeLong(this.orderNoId);
        dest.writeInt(this.orderStatus);
        dest.writeString(this.orderStatusStr);
        dest.writeInt(this.payPrice);
        dest.writeString(this.payPriceStr);
        dest.writeString(this.payTypeStr);
        dest.writeInt(this.platId);
        dest.writeInt(this.productType);
        dest.writeString(this.realName);
        dest.writeString(this.schoolName);
        dest.writeInt(this.shopId);
        dest.writeString(this.shopName);
        dest.writeString(this.title);
        dest.writeInt(this.userId);
        dest.writeString(this.userName);
        dest.writeList(this.itemList);
    }

    public RightOrderInfo() {
    }

    protected RightOrderInfo(Parcel in) {
        this.createDate = in.readLong();
        this.id = in.readInt();
        this.itemCount = in.readInt();
        this.mobile = in.readString();
        this.orderNoId = in.readLong();
        this.orderStatus = in.readInt();
        this.orderStatusStr = in.readString();
        this.payPrice = in.readInt();
        this.payPriceStr = in.readString();
        this.payTypeStr = in.readString();
        this.platId = in.readInt();
        this.productType = in.readInt();
        this.realName = in.readString();
        this.schoolName = in.readString();
        this.shopId = in.readInt();
        this.shopName = in.readString();
        this.title = in.readString();
        this.userId = in.readInt();
        this.userName = in.readString();
        this.itemList = new ArrayList<ItemListBean>();
        in.readList(this.itemList, ItemListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<RightOrderInfo> CREATOR = new Parcelable.Creator<RightOrderInfo>() {
        @Override
        public RightOrderInfo createFromParcel(Parcel source) {
            return new RightOrderInfo(source);
        }

        @Override
        public RightOrderInfo[] newArray(int size) {
            return new RightOrderInfo[size];
        }
    };
}
